<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /*
        小王入职薪水10k,每年涨幅5%，10年后小王的月薪为多少，总收入为多少？
        */
        var monthlySalary = 100000
        
        for(i=2;i<=10;i++){
            monthlySalary= parseInt (monthlySalary+(monthlySalary*0.05))
        }
        var annualSalary=monthlySalary*12
        console.log('十年后月薪为'+monthlySalary+'元');
        console.log('十年后年收入为'+annualSalary+'元');
        
    </script>
</body>
</html>